﻿namespace LinkedTU.Models
{
    using System;
    using System.ComponentModel.DataAnnotations;
    using LinkedTU.Common.Constants;
    using LinkedTU.Common.Interfaces;

    public class BaseDbEntity : IAuditableEntity
    {
        public DateTime CreatedOn { get; set; }

        [Required]
        [MinLength(ValidationConstants.MinUsernameLength)]
        [MaxLength(ValidationConstants.MaxUsernameLength)]
        public string CreatedBy { get; set; }

        public DateTime? ModifiedOn { get; set; }

        [Required]
        [MinLength(ValidationConstants.MinUsernameLength)]
        [MaxLength(ValidationConstants.MaxUsernameLength)]
        public string ModifiedBy { get; set; }

        public bool IsDeleted { get; set; }
    }
}
